var age = 11;
var name3 = "aaa";
var person1 = {
    age: 11,
    name: "aaa"
};
console.log(person1);
//ts用于函数
function add(a, b) {
    return a + b;
}
console.log(add(1, 2));
//ts用于类
var Animal = /** @class */ (function () {
    function Animal(name) {
        this.name = name;
    }
    Animal.prototype.eat = function () {
        console.log(this.name + " is eating");
    };
    return Animal;
}());
var animal1 = new Animal("dog");
animal1.eat();
//ts用于枚举
var Direction;
(function (Direction) {
    Direction[Direction["Up"] = 0] = "Up";
    Direction[Direction["Down"] = 1] = "Down";
    Direction[Direction["Left"] = 2] = "Left";
    Direction[Direction["Right"] = 3] = "Right";
})(Direction || (Direction = {}));
var go = Direction.Up;
console.log(go); // 输出: 0
var goName = Direction[Direction.Up];
console.log(goName); // 输出: "Up"
